home *** CD-ROM | disk | FTP | other *** search
- // Author : Andy Earp(NetSupport Ltd)
- // File name : DirLst.scp
- // Date created : 17/08/00
- // Description :
- // Small script designed to prompt the user to input the name of the Client they would like to connect to
- // and then print to the output box the number of directories found on the C:\. It will then state the name
- // of each directory found on the Client machine and then disconnect from the Client.
-
- Print "*************************************************************"
- Print " "
- Print "First this script will prompt the user to enter the name"
- Print "of the Client they wish to connect to. Next it will"
- Print "display a list of all the Directories found on the "
- Print "Client machine and also display the number of"
- Print "directories found."
- Wait (7)
-
- // Sets the transport to connect over this example is using the TCP/IP protocol
-
- SetTransport(T_TCPIP)
-
- // Declares the variables
-
- Dim Client
-
- //Condition is set for the input so that if the cancel button is pressed it will stop the script.
-
- If Input ("Please enter the name of the Client machine you would like to connect to: ", Client) = False then
- Print " "
- Print "You have cancelled out of the script"
- Print "*******************************************"
- Stop
- Else
-
- Print " "
- Print "Checking Connection to Client: ", Client
- if Connect (Client) then
-
- Print " "
- Print "Connection successfully made"
- Wait (3)
-
- Dim Dirs
-
- // Finds and prints the number of directories found on the C:\
- Print " "
- Print GetDirList (">C:\", Dirs)," Directories were found on the C:\"
- Print "*******************************************************************"
-
- // Will perform the below loop for every directory found on the C:\
-
- For each Directory in Dirs
-
- // Prints the name of the directory
-
- Print "Directory ", Directory
-
- Next
-
- wait (5)
- Print " "
- Print "Disconnecting from Client: ", Client
- wait (2)
- Disconnect (Client)
- Else
- Print " "
- Print "Could not connect to the Client!"
- Print "Please check the Client is available"
- Wait (2)
- Endif
-
- Print "*********************************************"
- Print " "
- Print "To edit or view the contents of this"
- Print "script right mouse button click"
- Print "on the Script icon and select Edit"
- Endif
-
- //Copyright ⌐ 2000
-
-